export const disposeArrFn = (arr) => {
  const index = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  const newArr = []
  index.forEach(i => {
    const obj = {}
    obj.row = i
    obj.children = []
    newArr.push(obj)
  })
  newArr.forEach(item => {
    arr.forEach(key => {
      if (+key.channelCode[0] === item.row && +key.channelCode[1] !== 0) {
        item.children.push(key)
      } else if (+(key.channelCode[0] + key.channelCode[1]) === item.row) {
        item.children.push(key)
      }
    })
  })
  return newArr
}
